#include<iostream>
//#include<string>
#include<cstdio>
//#include<cstring>
//#include<cmath>
//#include<algorithm>
using namespace std;

double bl()
{
	char str[105];
	double ans;
	cin>>str;
	switch (str[0])
	{
		case '+' : ans=bl()+bl();break;
		case '-' : ans=bl()-bl();break;
		case '*' : ans=bl()*bl();break;
		case '/' : ans=bl()/bl();break;
		default : ans=atof(str);
	}
	return ans;
}

int main()
{
	printf("%lf",bl());
	
	return 0;
}